using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Viettel.VOFFICE.DAO.Models.Mapping
{
    public class v_ControllerCollectionMap : EntityTypeConfiguration<v_ControllerCollection>
    {
        public v_ControllerCollectionMap()
        {
            // Primary Key
            this.HasKey(t => t.ControllerId);

            // Properties
            this.Property(t => t.ControllerName)
                .HasMaxLength(100);

            this.Property(t => t.ControllerFullName)
                .HasMaxLength(255);

            this.Property(t => t.ControllerDisplayName)
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("v_ControllerCollection");
            this.Property(t => t.ControllerId).HasColumnName("ControllerId");
            this.Property(t => t.ControllerName).HasColumnName("ControllerName");
            this.Property(t => t.ControllerFullName).HasColumnName("ControllerFullName");
            this.Property(t => t.ControllerDisplayName).HasColumnName("ControllerDisplayName");
        }
    }
}
